#pragma once
#include "../engine/engine.h"
#include "../engine/core/renderer/scene.h"
#include "../engine/core/renderer/node.h"
#include "../engine/core/renderer/ui/sprite.h"
#include "../engine/core/global/event.h"
#include "../engine/core/global/view.h"



#include "layout/layout-config.h"
#include "layout/layout-menu.h"
#include "layout/layout-hierarchy.h"
#include "layout/layout-asset.h"
#include "layout/layout-scene.h"
#include "layout/layout-tool.h"
#include "layout/layout-property.h"

class Editor
{
private:
    Engine *_engine;
    Scene *_scene;
    Node* _ndBg;

    LayoutMenu* _layoutMenu;
    LayoutHierarchy* _layoutHierarchy;
    LayoutAsset* _layoutAsset;
    LayoutScene* _layoutScene;
    LayoutTool* _layoutTool;
    LayoutProperty* _layoutProperty;

    void _initUI();
    void _initBg();
    void _initMenuUI();
    void _initHierarchyUI();
    void _initAssetUI();
    void _initSceneUI();
    void _initToolUI();
    void _initPropertyUI();
    void _updateUISize();




    /**
     * 窗口大小
     */
    void _updateWindowSize(float width, float height);

public:
    Editor();
    /**
     * @brief 初始化
     */
    void init(Engine *engine);
    ~Editor();
};
